package org.example.ims.DTO;

import com.fasterxml.jackson.annotation.JsonUnwrapped;
import lombok.Data;
import org.example.ims.Entity.Base.Product;

@Data
public class InventoryItemDTO {


    @JsonUnwrapped
    private Product product;
    private String warehouseName;
    private Integer stockWarningLevel;
    private String categoryName;

    public InventoryItemDTO(Product product, Integer quantity ,
                            String warehouseName, Integer stockWarningLevel,
                            String categoryName) {
        this.product = product;
        this.product.setProductStock(quantity);
        this.warehouseName = warehouseName;
        this.stockWarningLevel = stockWarningLevel;
        this.categoryName = categoryName;
    }
}
